package com.wc.AlgoOJ._期望DP.瓜子;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * @Author congge2
 * @Date 2024/10/7 14:29
 * @description http://43.138.190.70:8888/p/DP0707
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 4010, P = 998244353;
    static double INF = 1e20;
    static double[][] f = new double[N][N];
    static int n;

    public static void main(String[] args) {
        n = sc.nextInt();
        for (int i = 0; i < N; i++) {
            Arrays.fill(f[i], -1);
        }
        double res = dp(n, 0);
        out.printf("%.0f", res % P);
        out.flush();
    }

    static double dp(int a, int b) {
        if (f[a][b] >= 0) return f[a][b];
        if (a == 0) return f[a][b] = 0;
        double v = 1;
        if (a > 0) v += 1.0 * a / (a + b) * dp(a - 1, b + 2);
        if (b > 0) v += 1.0 * b / (a + b) * dp(a, b - 1);
        return f[a][b] = v;
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
